/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-form {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-form h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #333;
    font-size: 24px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 5px rgba(64, 158, 255, 0.2);
}

.form-group button {
    width: 100%;
    padding: 12px;
    background-color: #409eff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.form-group button:hover {
    background-color: #66b1ff;
}

.error-message {
    color: #f56c6c;
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fef0f0;
    border-radius: 4px;
    border: 1px solid #fde2e2;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
}

.form-footer a {
    color: #409eff;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* 仪表板样式 */
.dashboard {
    min-height: 100vh;
    display: flex;
    background-color: #f8f9fa;
}

/* 新的侧边栏样式 */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    height: 100vh;
    position: fixed;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

/* 用户资料卡片 */
.user-profile {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    margin-bottom: 15px;
}

.user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.user-info {
    margin-bottom: 15px;
}

.user-greeting {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 5px 0;
}

.username {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0;
}

.logout-form {
    margin: 0;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 导航菜单 */
.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0 25px 25px 0;
    margin-right: 20px;
}


.card-group {
    display: flex;
    gap: 20px; /* 卡片之间的间距 */
    width: 100%;
}

.half-width {
    flex: 1;
    min-width: 0; /* 允许卡片收缩 */
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th,
.user-table td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.user-table th {
    font-weight: 600;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-icon {
    margin-right: 10px;
    font-size: 16px;
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 20px;
    background-color: #f8f9fa;
}

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
}

.page-date {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.page-greeting {
    font-size: 16px;
    color: #666;
}

.username-highlight {
    color: #667eea;
    font-weight: 600;
}

/* 新的仪表板容器布局 */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 全宽卡片样式 */
.full-width {
    width: 100%;
}

/* 信息卡片特殊样式 */
.info-card:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.info-card:nth-child(1) .card-header h3 {
    color: white;
}

.info-card:nth-child(1) .card-header h3::before {
    content: '👤 ';
    margin-right: 8px;
}

.info-card:nth-child(1) .action-btn {
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    text-decoration: none;
}

.info-card:nth-child(1) .action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.info-card:nth-child(2) {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.2);
}

.info-card:nth-child(2) .card-header h3 {
    color: white;
}

.info-card:nth-child(2) .card-header h3::before {
    content[object Object]';
    margin-right: 8px;
}

.info-card:nth-child(2) .action-btn {
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    text-decoration: none;
}

.info-card:nth-child(2) .action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 用户表格在彩色背景下的样式 */
.info-card .user-table {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
}

.info-card .user-table th {
    background: rgba(255, 255, 255, 0.9);
    color: #333 !important;
    font-weight: 600;
}

.info-card .user-table td {
    color: #333;
    background: rgba(255, 255, 255, 0.95);
}

.info-card .user-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.85);
}

/* 职位列表在彩色背景下的样式 */
.info-card .job-list {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
}

.info-card .job-item {
    color: #333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.info-card .job-item:last-child {
    border-bottom: none;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

/* 卡片基础样式 */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.card-content {
    padding: 20px;
}

/* 统计卡片样式 */
.stat-card-large,
.stat-card-medium {
    color: white !important;
    min-height: 150px;
    position: relative;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card-large::before,
.stat-card-medium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    opacity: 0.9;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.stat-card-large:hover::before,
.stat-card-medium:hover::before {
    opacity: 1;
}

.stat-card-large::after,
.stat-card-medium::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.stat-card-large:hover::after,
.stat-card-medium:hover::after {
    opacity: 1;
}

.stat-card-large .card-header,
.stat-card-large .card-content,
.stat-card-medium .card-header,
.stat-card-medium .card-content {
    position: relative;
    z-index: 3;
}

/* 为每个统计卡片设置独特的渐变背景 */
.stats-grid .card:nth-child(1) {
    background: linear-gradient(135deg, #6f86d6 0%, #48c6ef 100%) !important;
}

.stats-grid .card:nth-child(2) {
    background: linear-gradient(135deg, #ff8c42 0%, #ffc3a0 100%) !important;
}

.stats-grid .card:nth-child(3) {
    background: linear-gradient(135deg, #76e2b3 0%, #48c6ef 100%) !important;
}

.stats-grid .card:nth-child(4) {
    background: linear-gradient(135deg, #f78ca0 0%, #f9748f 100%) !important;
}

.stats-grid .card:nth-child(5) {
    background: linear-gradient(135deg, #a8c0ff 0%, #3f2b96 100%) !important;
}

.stats-grid .card:nth-child(6) {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%) !important;
}

.stats-grid .card:nth-child(7) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important;
}

/* 统计卡片内容 */
.stat-card-large .card-header h3,
.stat-card-medium .card-header h3 {
    color: white !important;
}

.stat-card-large .card-content,
.stat-card-medium .card-content {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    color: white !important;
}

.stat-card-large:hover .stat-number,
.stat-card-medium:hover .stat-number {
    transform: scale(1.1);
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.9) !important;
}

/* 为统计卡片添加图标样式 */
.stat-card .card-header::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

/* 职位总数图标 */
.stat-card:nth-child(1) .card-header::before {
    content: '💼';
}

/* 用户数据图标 */
.stat-card:nth-child(2) .card-header::before {
    content: '👥';
}

/* 公司总数图标 */
.stat-card:nth-child(3) .card-header::before {
    content: '🏢';
}

/* 最高学历图标 */
.stat-card:nth-child(4) .card-header::before {
    content: '🎓';
}

/* 最高薪资图标 */
.stat-card:nth-child(5) .card-header::before {
    content: '💰';
}

/* 优势地区图标 */
.stat-card:nth-child(6) .card-header::before {
    content: '📍';
}

/* 用户信息列表 */
.user-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar-small img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.user-role,
.user-time {
    font-size: 12px;
    color: #888;
}

.user-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
}

.user-status.active {
    background-color: #e8f5e9; /* 绿色背景 */
    color: #4caf50; /* 绿色文字 */
}

.user-status.offline {
    background-color: #fbe9e7; /* 红色背景 */
    color: #ff5722; /* 红色文字 */
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: 2fr 1fr 1fr;
        grid-template-areas:
            "chart info stats1"
            "chart info stats2"
            "chart info stats3"
            "stats4 stats5 stats6"
            "stats7 . .";
    }
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "chart info"
            "stats1 stats2"
            "stats3 stats4"
            "stats5 stats6"
            "stats7 .";
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "chart"
            "info"
            "stats1"
            "stats2"
            "stats3"
            "stats4"
            "stats5"
            "stats6"
            "stats7";
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* 图表容器样式调整 */
.chart-card .card-content {
    height: 300px;
    position: relative;
}

#userCreationPieChart {
    max-height: 100%;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 为不同卡片添加不同的动画延迟 */
.dashboard-container > .card:nth-child(1) {
    animation: slideInLeft 0.8s ease-out;
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

.dashboard-container > .card:nth-child(2) {
    animation: slideInRight 0.8s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.stats-grid .card:nth-child(1) {
    animation: fadeIn 0.6s ease-out;
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

.stats-grid .card:nth-child(2) {
    animation: fadeIn 0.6s ease-out;
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.stats-grid .card:nth-child(3) {
    animation: fadeIn 0.6s ease-out;
    animation-delay: 0.5s;
    animation-fill-mode: both;
}

.stats-grid .card:nth-child(4) {
    animation: fadeIn 0.6s ease-out;
    animation-delay: 0.6s;
    animation-fill-mode: both;
}

.stats-grid .card:nth-child(5) {
    animation: fadeIn 0.6s ease-out;
    animation-delay: 0.7s;
    animation-fill-mode: both;
}

.stats-grid .card:nth-child(6) {
    animation: fadeIn 0.6s ease-out;
    animation-delay: 0.8s;
    animation-fill-mode: both;
}


/* 数据管理页面样式 */
.main-content .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.main-content .page-header h1 {
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 250px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #4A90E2;
    color: white;
}

.btn-primary:hover {
    background-color: #357ABD;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th, .data-table td {
    padding: 12px;
    border: 1px solid #f0f0f0;
    text-align: left;
    font-size: 14px;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
}

.pagination-btn.active {
    background-color: #4A90E2;
    color: white;
    border-color: #4A90E2;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover, .close-btn:focus {
    color: black;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px;
    border-radius: 5px;
    color: white;
    z-index: 2000;
    min-width: 200px;
    text-align: center;
}

.message-success {
    background-color: #2ecc71;
}

.message-error {
    background-color: #e74c3c;
}



/* 数据统计页面样式 */
.stats-section {
    margin-bottom: 30px;
}

.stats-section h3 {
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.stats-table table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table th, .stats-table td {
    padding: 12px;
    border: 1px solid #f0f0f0;
    text-align: left;
}

.stats-table th {
    background-color: #f8f9fa;
}



/* 个人中心页面样式 */
.profile-section {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.profile-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
